﻿<?php
// 本类由系统自动生成，仅供测试用途
class IndexAction extends Action {
    public function index(){
	   $User = M('User'); // 实例化Data数据模型
        $this->title = $User->select();
	
        $this->display();
    }
	 public function news(){
		$this->display(); 
	 }
	public function insert(){
	    header("Content-type:text/html;charset=utf-8");
        $User = M("User");
		 $User->create();
		 $User->add();
	  echo "已经添加成功". "<a href='/'>返回</a>";
}
 /*    public function show($id=1){
  	      $Data = M("Data");
	       $this->title=$Data->find($id);
	       $this->display();
}*/
}
?>